import { Component, Input } from '@angular/core';
@Component({
  selector: 'app-edit-customer-discount-rate',
  templateUrl: './edit-customer-discount-rate.component.html',
  styleUrls: ['./edit-customer-discount-rate.component.scss']
})
export class EditCustomerDiscountRateComponent {
  @Input() data: any
  form: any = {
    customerDiscountId: null,
    customerDiscountName: "",
    discount: 0
  }
  discount: any = 0
  constructor() { }
  ngOnInit(): void {
    this.form = this.data.data
    this.discount = this.data.data.discount * 100
  }
  ngModelChange() {
    this.form.discount = this.discount/100
  }
}
